---
title: OpenAI Agents Provider
subtitle: Use Composio with OpenAI's Agents SDK
slug: /providers/openai-agents
image: "https://og.composio.dev/api/og?title=OpenAI%20Agents%20Provider"   # image for socials
keywords: ""
hide-nav-links: false
---

## OpenAI Agents Provider

The OpenAI Agents Provider is a provider that formats the Composio tools into an object compatible with OpenAI's Agents API.

OpenAI Agents SDK is different from the OpenAI SDK. It helps build agentic AI apps in a lightweight, easy-to-use package with very few abstractions.

## Setup

```bash
pip install composio_openai_agents==0.8.0 openai-agents
```

### Usage
```python Python maxLines=60 wordWrap
import asyncio

from agents import Agent, Runner

from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider

# Initialize Composio toolset
composio = Composio(provider=OpenAIAgentsProvider())

# Get all the tools
tools = composio.tools.get(
    user_id="default",
    tools=["GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"],
)

# Create an agent with the tools
agent = Agent(
    name="GitHub Agent",
    instructions="You are a helpful assistant.",
    tools=tools,
)

# Run the agent
async def main():
    result = await Runner.run(
        starting_agent=agent,
        input=(
            "Star the repository composiohq/composio on GitHub"
        ),
    )
    print(result.final_output)

asyncio.run(main())
```